package com.hjm.project.cardBag.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import com.hjm.project.cardBag.mapper.CardBagMapper;
import com.hjm.project.cardBag.domain.CardBag;
import com.hjm.project.cardBag.service.ICardBagService;
import com.hjm.common.utils.text.Convert;

import javax.annotation.Resource;

/**
 * 卡包Service业务层处理
 * 
 * @author maker-platform
 * @date 2021-04-14
 */
@Service
public class CardBagServiceImpl implements ICardBagService 
{
    @Resource
    private CardBagMapper cardBagMapper;

    /**
     * 查询卡包
     * 
     * @param id 卡包ID
     * @return 卡包
     */
    @Override
    public CardBag selectCardBagById(Integer id)
    {
        return cardBagMapper.selectCardBagById(id);
    }

    /**
     * 查询卡包列表
     * 
     * @param cardBag 卡包
     * @return 卡包
     */
    @Override
    public List<CardBag> selectCardBagList(CardBag cardBag)
    {
        return cardBagMapper.selectCardBagList(cardBag);
    }

    /**
     * 新增卡包
     * 
     * @param cardBag 卡包
     * @return 结果
     */
    @Override
    public int insertCardBag(CardBag cardBag)
    {
        return cardBagMapper.insertCardBag(cardBag);
    }

    /**
     * 修改卡包
     * 
     * @param cardBag 卡包
     * @return 结果
     */
    @Override
    public int updateCardBag(CardBag cardBag)
    {
        return cardBagMapper.updateCardBag(cardBag);
    }

    /**
     * 删除卡包对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteCardBagByIds(String ids)
    {
        return cardBagMapper.deleteCardBagByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除卡包信息
     * 
     * @param id 卡包ID
     * @return 结果
     */
    @Override
    public int deleteCardBagById(Integer id)
    {
        return cardBagMapper.deleteCardBagById(id);
    }
}
